# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=cogl
pkgver=1.22.8
pkgrel=0
pkgdesc="An object oriented GL/GLES Abstraction/Utility Layer"
options="!check" # All tests fail for unknown reasons
url="https://gitlab.gnome.org/GNOME/cogl"
arch="all"
license="MIT"
makedepends="
	automake
	autoconf
	libtool
	libxcomposite-dev
	libxrandr-dev
	mesa-dev
	gdk-pixbuf-dev
	wayland-dev
	pango-dev
	cairo-dev
	gobject-introspection-dev
	gtk-doc
	"
#	gstreamer-dev
#	gst-plugins-base-dev
#	"
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.gnome.org/sources/cogl/${pkgver%.*}/cogl-$pkgver.tar.xz"

prepare() {
	default_prepare

	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-gles2 \
		--disable-gles1 \
		--enable-kms-egl-platform \
		--enable-gl \
		--enable-gdk-pixbuf \
		--enable-introspection \
		--enable-cairo \
		--enable-wayland-egl-platform \
		--enable-wayland-egl-server
	make -j1 # fails to link cogl-gst into itself otherwise...
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="702d5b1b22dc34bffaa82c9c57021caf036ee3a13fa7ca24a90cca1ebc0f8b7a86070cc1fe5125757132b02774fa874bb55675c96d1ccbc233fac0e6132da65f  cogl-1.22.8.tar.xz"
